<form class="layui-form" action="/agent/transfer/save.html" method="post" >
	<input type="hidden" name="userid" value="${userid!''}">
	<input type="hidden" name="agentserviceid" value="${agentserviceid!''}">
	<input type="hidden" name="agentuserid" value="${agentuserid!''}">
		
	<div class="layui-tab">
	  <ul class="layui-tab-title">
	    <li class="layui-this">转坐席</li>
	    <!-- 
	    <li>转技能组</li>
	     -->
	  </ul>
	  <div class="layui-tab-content">
	    <div class="layui-tab-item layui-show">
	    	
	    	<div class="row">
			    <div class="col-lg-12">
			        <table class="layui-table" lay-skin="line">
						<colgroup>
							<col width="2%">
							<col width="30%">
							<col width="30%">
							<col width="10%">
							<col width="10%">
						</colgroup>
			            <thead>
			                <tr>
			                    <th style="width:3px;padding:10px 10px 10px 10px;"></th>
			                    <th>用户</th>
			                    <th>登陆时间</th>
			                    <th>最大用户数</th>
			                    <th>服务用户数</th>
			            </thead>
			            <tbody>
			                <#if userList??>
			                    <#list userList as user>
			                        <tr class="ukefu-agentstatus">
			                            <td style="width:1px;padding:10px 0px 10px 10px;">
			                                <input type="checkbox" name="agentno" class="ctxid" value="${user.id!''}" id="user_${user.id}" style="display:block;">
			                            </td>
			                            <td>${user.username!''}（${user.uname!''}）</td>
			                            <td><#if user.agentStatus??>${user.agentStatus.logindate?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
			                            <td>
			                            	<#if user.agentStatus??>${user.agentStatus.maxusers!0}</#if>
			                            </td>
			                            <td>
			                                <#if user.agentStatus??>${user.agentStatus.users!0}</#if>
			                            </td>
			                    </#list>
			                </#if>
			            </tbody>
			        </table>
			    </div>
			</div>
	    </div>
	    <!-- 
	    <div class="layui-tab-item">
	    	转技能组
	    </div>
	     -->
	  </div>
	</div>
	
	<div class="layui-form-button">
		<div class="layui-button-block">
			<button class="layui-btn" lay-submit lay-filter="contactsForm">转接</button>
			<button type="reset" class="layui-btn layui-btn-primary" onclick="layer.close(layer.index);">关闭</button>
		</div>
	</div>
</form>
<script>
	$('.ukefu-agentstatus td:not(:last-child)').on("click" , function(){
		$('.ctxid').prop("checked" , false);
		if($(this).parent().find("input").prop("checked")){
			$(this).parent().find("input").prop("checked" , false);
		}else{
			$(this).parent().find("input").prop("checked" , true);
		}
	});
</script>
